<template>
	<view class="recommendItem" @click="ItemclickHander">
		<view class="img">
			<image :src="recommendItemData.menuImg" mode="aspectFill"></image>
		</view>
		<view class="name text-cut">{{recommendItemData.menuName}}</view>
		<view class="price">就餐人数:{{recommendItemData.menuPrice}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		props: {
			recommendItemData: {
				type: Object,
				default: {}
			}
		},
		methods: {
			ItemclickHander() {
				this.$emit('click', this.recommendItemData.menuId)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.recommendItem {
		border-radius: 10upx;
		border: 2upx solid #EEEEEE;
		width: 300upx;

		.img {
			image {
				width: 100%;
				height: 340upx;
			}
		}

		.name {
			margin-top: 14upx;
			padding-left: 10upx;

		}

		.price {
			padding-left: 10upx;
			margin-bottom: 14upx;
		}
	}
</style>
